package org.kotboot.enums;


import org.kotboot.kit.K;

/**
 * jisong.sun 2017/9/15 16:10
 */
public enum  DictState implements CodeEnum<DictState> {
    A(1);

    private int code;

    DictState(int code){
        this.code = code;
    }

    @Override
    public int code(){
        return code;
    }

    public static DictState of(int val){
        if(K.isEmpty(val)) return null;
        for (DictState dict:DictState.values()){
            if(dict.code == val){
                return dict;
            }
        }
        return null;
    }
}
